﻿@model HomeModel
@{
	Layout = null;
}
<!DOCTYPE HTML>
<html>
<head>
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<title>@Resources.HuiTongCIS</title>
	<link rel="stylesheet" type="text/css" href="~/Content/jquery-easyui-1.4.5/themes/default/easyui.css" />
	<link rel="stylesheet" type="text/css" href="~/Content/jquery-easyui-1.4.5/themes/icon.css" />
	@Styles.Render("~/Content/css")
	@Styles.Render("~/Content/stylecss")
	@Scripts.Render("~/bundles/modernizr")
	@Scripts.Render("~/bundles/jquery")
	<script type="text/javascript" charset="utf-8" src="~/Scripts/jquery-easyui-1.4.5/jquery.easyui.min.js"></script>
	<script type="text/javascript" charset="utf-8" src="~/Scripts/jquery-easyui-1.4.5/locale/@ViewBag.EasyUiLanguage"></script>
	@Scripts.Render("~/bundles/common")
	<script type="text/javascript" charset="utf-8" src="~/Scripts/layer/layer.js"></script>
	<script type="text/javascript" src="~/Scripts/jquery-easyui-1.4.5/myjs.dialog.js"></script>
	<link rel="stylesheet" type="text/css" href="~/Content/Site.css" />
	<link rel="stylesheet" type="text/css" href="~/Content/Style.css" />
	<script type="text/javascript" charset="utf-8" src="~/Scripts/homepage/jquery.js"></script>
	<script type="text/javascript" charset="utf-8" src="~/Scripts/homepage/lrtk.js"></script>
	<script type="text/javascript">
		(function ($) {
			$.fn.extend({
				Scroll: function (opt, callback) {
					//参数初始化
					if (!opt) var opt = {};
					var _btnUp = $("#" + opt.up);//向上按钮
					var _btnDown = $("#" + opt.down);//向下按钮
					var timerID;
					var _this = this.eq(0).find("ul:first");
					if (_this.find("li").length <= 5) {
						return;
					}
					var lineH = _this.find("li:first").height(),//获取行高
					    line = opt.line ? parseInt(opt.line, 10) : parseInt(this.height() / lineH, 10),//每次滚动的行数，默认为一屏，即父容器高度
					    speed = opt.speed ? parseInt(opt.speed, 12) : 500;//卷动速度，数值越大，速度越慢（毫秒）
					timer = opt.timer //?parseInt(opt.timer,10):3000;//滚动的时间间隔（毫秒）
					if (line == 0) line = 1;
					var upHeight = 0 - line * lineH;
					//滚动函数
					var scrollUp = function () {
						_btnUp.unbind("click", scrollUp);//取消向上按钮的函数绑定
						_this.animate({ marginTop: upHeight },
						    speed, function () {
						    	for (i = 1; i <= line; i++) {
						    		_this.find("li:first").appendTo(_this);
						    	}
						    	_this.css({ marginTop: 0 });
						    	_btnUp.bind("click", scrollUp);//绑定向上按钮的点击事件
						    });
					}
					//向下翻页函数
					var scrollDown = function () {
						_btnDown.unbind("click", scrollDown);
						for (i = 1; i <= line; i++) {
							_this.find("li:last").show().prependTo(_this);
						}
						_this.css({ marginTop: upHeight });
						_this.animate({ marginTop: 0 },
						    speed, function () {
						    	_btnDown.bind("click", scrollDown);
						    });
					}
					//自动播放
					var autoPlay = function () {
						if (timer) timerID = window.setInterval(scrollUp, timer);
					};
					var autoStop = function () {
						if (timer) window.clearInterval(timerID);
					};
					//鼠标事件绑定
					_this.hover(autoStop, autoPlay).mouseout();
					_btnUp.css("cursor", "pointer").click(scrollUp).hover(autoStop, autoPlay);//向上向下鼠标事件绑定
					_btnDown.css("cursor", "pointer").click(scrollDown).hover(autoStop, autoPlay);
				}
			})

			
		})(jQuery);
		$(document).ready(function () {
			$("#scrollDiv01").Scroll({ line: 1, speed: 600, timer: 3500, up: "btn1", down: "btn2" });
		});
		$(document).ready(function () {
			$("#scrollDiv02").Scroll({ line: 1, speed: 650, timer: 5000, up: "btn1", down: "btn2" });
		});

		$(function () {
			var language = "";
			@if (Request.Cookies["_culture"] == null) {
				<text>
				language = "@ConstValues.Language.Cn";
				</text>
			} else {
				<text>
				language = "@Request.Cookies["_culture"].Value";
				</text>
			}

			if (language == "@ConstValues.Language.Cn") {
				$("#cultureCn").css("background-color", "#c30d23");
				$("#cultureEn").css("background-color", "#7c7c7c");
				$("#mlogo").append('<img id="logo" src="../Images/homeImg/logo.png" />');
				$("#hidCulture").val(language);

				$("#cultureEn").hover(function () {
					$(this).css("color", "#c30d23");
					$(this).css("background-color", "#fff");
				}, function () {
					$(this).css("color", "#fff");
					$(this).css("background-color", "#7c7c7c");
				})
			} else {
				$("#cultureCn").css("background-color", "#7c7c7c");
				$("#cultureCn").css("borderRight", "0px");
				$("#cultureEn").css("background-color", "#c30d23");
				$("#mlogo").append('<img id="logo" src="../Images/homeImg/login_enlogo2.png" />')
				$("#hidCulture").val(language);

				$(".con").find(".ll").attr("style", "font-size:12px;font-weight:bold;text-indent:12px;");
				$(".con").find(".rr").attr("style", "font-size:12px;font-weight:bold;text-indent:2px;");
				$(".con").find(".gray01").attr("style", "font-size:12px;font-weight:bold;text-indent:12px;");
				$(".con").find(".gray02").attr("style", "font-size:12px;font-weight:bold;text-indent:2px;");

				$("#cultureCn").hover(function () {
					$(this).css("color", "#c30d23");
					$(this).css("background-color", "#fff");
				}, function () {
					$(this).css("color", "#fff");
					$(this).css("background-color", "#7c7c7c");
				})
			}
		});
	</script>
</head>
<body id="main">
	<div class="mar" style="position:relative;z-index:999">
		<div class="index">
			<!-- header start -->
			<div class="header02">
				<div class="t">
					<div class="fl"><img src="~/Images/homeImg/icon_01.png" align="absmiddle" width="16" />&nbsp;&nbsp;@Resources.Welcome@Resources.Vister&nbsp;&nbsp;</div>
					<div class="fl">
						@using (Html.BeginForm(nameof(UtilityController.SetCulture),
							nameof(UtilityController).GetControllerName(),
							FormMethod.Post, new { id = "frmCulture" }))
						{
							<a href="javascript:$('#hidCulture').val('@ConstValues.Language.Cn');$('#frmCulture').submit();" id="cultureCn" class="cn">@Resources.Chinese</a>
							<a href="javascript:$('#hidCulture').val('@ConstValues.Language.En');$('#frmCulture').submit();" id="cultureEn" class="en">@Resources.English</a>
							<input type="hidden" id="hidCulture" name="culture"  />
						}
					</div>
					<div class="fl">
						<a href="javascript:void(0);" onclick="$(window.location).attr('href', '/Account/Login');">@Resources.Login</a>
						<a href="@Url.Action(nameof(RegisterController.Index),nameof(RegisterController).GetControllerName())">@Resources.Register</a>
					</div>
				</div>
				<div class="clear"></div>
			</div>
			<!-- header end -->
			<!-- container start -->
			<div class="container">
				<div class="fl" id="mlogo"></div>
				<div class="fr mainmenu">
					<ul>
						<li><a href="@Url.Action(nameof(HomeController.Help),nameof(HomeController).GetControllerName())"><h3>@Resources.Help</h3></a></li>
						<li><a href="@Url.Action(nameof(HomeController.AboutUs),nameof(HomeController).GetControllerName())"><h3>@Resources.AboutUs</h3></a></li>
						<li><a href="@Url.Action(nameof(MeetingListLogoutController.Index),nameof(MeetingListLogoutController).GetControllerName())"><h3>@Resources.MeetingList</h3></a></li>
						<li><a href="#" class="s"><h3>@Resources.HomePage</h3></a></li>
					</ul>
				</div>
				<div class="clear"></div>
			</div>
			<!-- container end -->
		</div>
		<!-- slide start -->
		<div class="slide-main" id="touchMain">
			<a class="prev" href="javascript:;" stat="prev1001"><img src="~/Images/homeImg/l-btn.png" /></a>
			<div class="slide-box" id="slideContent">
				@if (Model.SliderList.Count() > 0) {
					for (int index = 0; index < Model.SliderList.Count(); index++) {
						if (index <= 4) {
							if (!string.IsNullOrEmpty(Model.SliderList[index].link)) {
								<div class="slide" id="bgstyled">
									<a stat="sslink-@index" href="@Model.SliderList[index].link" target="_blank">
										<div class="obj-a"></div>
										<div class="obj-f">
											<img src='@Url.Action(nameof(UtilityController.BannerImg), nameof(UtilityController).GetControllerName())?id=@Model.SliderList[index].id'>
										</div>
									</a>
								</div>
							} else {							
								<div class="slide" id="bgstyled">
									<a stat="sslink-@index" >
										<div class="obj-a"></div>
										<div class="obj-f">
											<img src='@Url.Action(nameof(UtilityController.BannerImg), nameof(UtilityController).GetControllerName())?id=@Model.SliderList[index].id'>
										</div>
									</a>
								</div>
							}
						}
					}
				} else {
					<div class="slide" id="bgstyled">
						<a stat="sslink-1" href="#">
							<div class="obj-a"></div>
							<div class="obj-f">
								<img src="~/Images/homeImg/banner02.jpg">
							</div>
						</a>
					</div>
				}
			</div>
			<a class="next" href="javascript:;" stat="next1002"><img src="~/Images/homeImg/r-btn.png" /></a>
			<div class="item">
				@if (Model.SliderList.Count() > 0) {
					for (int index = 0; index < Model.SliderList.Count(); index++) {
						if (index <= 4) {
							if (index == 0) {
								<a class="cur" stat="item@(index + 1)" href="javascript:;"></a>
							} else {
								<a href="javascript:;" stat="item@(index + 1)"></a>
							}
						}
					}
				} else {
					<a class="cur" stat="item1" href="javascript:;"></a>
				}

			</div>
		</div>
		<!-- slide end -->
		<div class="index">
			<!-- mainnav start -->
			<div class="mainnav">
				<ul>
					<li>
						<a href="#" class="a1">
							<div class="nav fl"></div>
							<div class="txt fl">
								<h3>@Resources.HomepageBodyOneTopic</h3>
								<p>@Resources.HomepageBodyOne</p>
							</div>
							<div class="clear"></div>
						</a>
					</li>
					<li>
						<a href="#" class="a2">
							<div class="nav fl"></div>
							<div class="txt fl">
								<h3>@Resources.HomepageBodyTwoTopic</h3>
								<p>@Resources.HomepageBodyTwo</p>
							</div>
							<div class="clear"></div>
						</a>
					</li>
					<li>
						<a href="#" class="a3">
							<div class="nav fl"></div>
							<div class="txt fl">
								<h3>@Resources.HomepageBodyThreeTopic</h3>
								<p>@Resources.HomepageBodyThree</p>
							</div>
							<div class="clear"></div>
						</a>
					</li>
					<li>
						<a href="#" class="a4">
							<div class="nav fl"></div>
							<div class="txt fl">
								<h3>@Resources.HomepageBodyFourTopic</h3>
								<p>@Resources.HomepageBodyFour</p>
							</div>
							<div class="clear"></div>
						</a>
					</li>
					<li>
						<a href="#" class="a5">
							<div class="nav fl"></div>
							<div class="txt fl">
								<h3>@Resources.HomepageBodyFiveTopic</h3>
								<p>@Resources.HomepageBodyFive</p>
							</div>
							<div class="clear"></div>
						</a>
					</li>
					<li>
						<a href="#" class="a6">
							<div class="nav fl"></div>
							<div class="txt fl">
								<h3>@Resources.HomepageBodySixTopic</h3>
								<p>@Resources.HomepageBodySix</p>
							</div>
							<div class="clear"></div>
						</a>
					</li>
				</ul>
			</div>
			<!-- mainnav end -->
			
		</div>
		<div class="clear"></div>
		<div class="index">
			<!-- scroll01 start -->
			<div class="scroll01 fl">
				<div class="tit"><h3>@Resources.ComingConference</h3></div>
				<div id="scrollDiv01">
					<ul id="isInHome">
						@if (Model.MeetingInHomeList.Count() > 0) {
							for (int index = 0; index < Model.MeetingInHomeList.Count(); index++) {
								<li>
									<div class="fl l">
										@if (!string.IsNullOrEmpty(Model.MeetingInHomeList[index].homepageUrl)) {
											<a href="@Model.MeetingInHomeList[index].homepageUrl" target="_blank">@Model.MeetingInHomeList[index].conferenceName</a>
										} else {
											<a href="@Url.Action(nameof(MeetingMainController.Index), nameof(MeetingMainController).GetControllerName())/@Model.MeetingInHomeList[index].conferenceNickName" target="_blank">@Model.MeetingInHomeList[index].conferenceName</a>											
										}									
										<p style="overflow: hidden;text-overflow:ellipsis;white-space: nowrap; width:380px"><img src="~/images/homeImg/icon_15.png" align="absmiddle" />&nbsp;@Model.MeetingInHomeList[index].conferenceStartDate @Resources.To @Model.MeetingInHomeList[index].conferenceEndDate &nbsp;&nbsp;&nbsp;&nbsp;<img src="~/Images/homeImg/icon_14.png" align="absmiddle" />&nbsp;<span>@Model.MeetingInHomeList[index].operateLocation</span></p>
									</div>
									<div class="fl r">
										@if ((!Model.MeetingInHomeList[index].allowRegister && !Model.MeetingInHomeList[index].allowContribute) || (!Model.MeetingInHomeList[index].hasContribute && !Model.MeetingInHomeList[index].hasRegister)) {
											<img src="@Url.Action(nameof(UtilityController.ConferenceImg), nameof(UtilityController).GetControllerName())/@Model.MeetingInHomeList[index].id" class="small" />
										} else {
											<div class="con">
												@if (!Model.MeetingInHomeList[index].allowContribute || !Model.MeetingInHomeList[index].hasContribute) {
													<a class="gray01">@Resources.MeetingContribute</a>
												} else {
													<a href="@Url.Action(nameof(AccountController.Login),nameof(AccountController).GetControllerName())?returnUrl=/MeetingContribute/Index?conferenceId=@Model.MeetingInHomeList[index].id" class="ll">@Resources.MeetingContribute</a>													
												}
												
												@if (!Model.MeetingInHomeList[index].allowRegister || !Model.MeetingInHomeList[index].hasRegister) {
													<a class="gray02">@Resources.MeetingAttendence</a>
												} else {
													<a href="@Url.Action(nameof(AccountController.Login),nameof(AccountController).GetControllerName())?returnUrl=/MeetingAttendence/Index?conferenceId=@Model.MeetingInHomeList[index].id" class="rr">@Resources.MeetingAttendence</a>													
												}
											</div>
										}
									</div>								
									<div class="clear"></div>
								</li>
							}
						}
					</ul>
				</div>
			</div>
			<!-- scroll01 end -->
			<!-- scroll02 start -->
			<div class="scroll02 fl">
				<div class="tit"><h3>@Resources.IsRecommendConference</h3></div>
				<div id="scrollDiv02">
					<ul id="isRecommend">
						@if (Model.MeetingRecommendList.Count() > 0) {
							for (int index = 0; index < Model.MeetingRecommendList.Count(); index++) {
								<li>
									<div class="fl l">
										@if (!string.IsNullOrEmpty(Model.MeetingRecommendList[index].homepageUrl)) {
											<a href="@Model.MeetingRecommendList[index].homepageUrl" target="_blank">@Model.MeetingRecommendList[index].conferenceName</a>
										} else {
											<a href="@Url.Action(nameof(MeetingMainController.Index), nameof(MeetingMainController).GetControllerName())/@Model.MeetingRecommendList[index].conferenceNickName" target="_blank">@Model.MeetingRecommendList[index].conferenceName</a>
										}									
										<p style="overflow: hidden;text-overflow:ellipsis;white-space: nowrap; width:380px"><img src="~/images/homeImg/icon_15.png" align="absmiddle" />&nbsp;@Model.MeetingRecommendList[index].conferenceStartDate @Resources.To @Model.MeetingRecommendList[index].conferenceEndDate &nbsp;&nbsp;&nbsp;&nbsp;<img src="~/Images/homeImg/icon_14.png" align="absmiddle" />&nbsp;<span>@Model.MeetingRecommendList[index].operateLocation</span></p>
									</div>
									<div class="fl r">
										@if ((!Model.MeetingRecommendList[index].allowRegister && !Model.MeetingRecommendList[index].allowContribute) || (!Model.MeetingRecommendList[index].hasContribute && !Model.MeetingRecommendList[index].hasRegister)) {
											<img src="@Url.Action(nameof(UtilityController.ConferenceImg), nameof(UtilityController).GetControllerName())/@Model.MeetingRecommendList[index].id" class="small" />
										} else {
											<div class="con">
												@if (!Model.MeetingRecommendList[index].allowContribute || !Model.MeetingRecommendList[index].hasContribute) {
													<a class="gray01">@Resources.MeetingContribute</a>
												} else {
													<a href="@Url.Action(nameof(AccountController.Login),nameof(AccountController).GetControllerName())?returnUrl=/MeetingContribute/Index?conferenceId=@Model.MeetingRecommendList[index].id" class="ll">@Resources.MeetingContribute</a>
												}

												@if (!Model.MeetingRecommendList[index].allowRegister || !Model.MeetingRecommendList[index].hasRegister) {
													<a class="gray02">@Resources.MeetingAttendence</a>
												} else {
													<a href="@Url.Action(nameof(AccountController.Login),nameof(AccountController).GetControllerName())?returnUrl=/MeetingAttendence/Index?conferenceId=@Model.MeetingRecommendList[index].id" class="rr">@Resources.MeetingAttendence</a>
												}
											</div>
										}
									</div>
									<div class="clear"></div>
								</li>
							}
						}
					</ul>
				</div>
			</div>
			<!-- scroll02 end -->
			<div class="clear"></div>
		</div>
		<!-- footer start -->
		<div class="footer">
			<p>&copy;@Resources.CopyRightOfCisSystem</p>
			<p id="CopyRightId" style="margin-top:-70px">
				<a href="@Resources.CopyRightOfCisSystemLinkOne" target="_blank" style="color:#999">@Resources.CopyRightOfCisSystemOne &nbsp;&nbsp;</a>
				<a href="@Resources.CopyRightOfCisSystemLinkTwo" target="_blank" style="color:#999"><img src="~/Images/police.png" style="position:relative; top:4px;" />@Resources.CopyRightOfCisSystemTwo</a>
			</p>
		</div>
		<!-- footer end -->
	</div>
	<div style="position:fixed;z-index:999;left:15px;top:465px;width:80px;"><img src="~/Images/downloadQrCode.png" width="80" /><p style="color:#000;font-size:14px;text-align:center;padding:0px;line-height:18px;font-weight:bold;">@Resources.Scan<br />@Resources.downloadApp</p></div>
</body>
</html>